package com.xjoyt.pay.master.po;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ForeignKey;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * 机构设置
 * 
 * @author Administrator
 *
 */
@Entity
@Table(name = "t_company_preference")
public class CompanyPreference {

	@Id
	@GeneratedValue(generator = "generator")
	@GenericGenerator(name = "generator", strategy = "assigned")
	@Column(name = "company_preference_id", length = 36)
	public String id;

	/**
	 * 公司
	 */
	@OneToOne(targetEntity = Company.class, cascade = {})
	@JoinColumn(name = "company_id", foreignKey = @ForeignKey(name = "none"))
	// @JsonIgnore
	public Company company;

	/**
	 * 平台名称
	 */
	@Column(name = "name", length = 255)
	public String name;

	/**
	 * domain
	 */
	@Column(name = "domain", length = 255)
	public String domain;

	/**
	 * 服务电话
	 */
	@Column(name = "service_phone", length = 255)
	public String servicePhone;

	/**
	 * 平台颜色
	 */
	@Column(name = "color", length = 20)
	public String color;

	/**
	 * 平台协议
	 */
	@Lob
	@Basic(fetch = FetchType.LAZY)
	@Column(name = "terms", columnDefinition = "TEXT")
	public String terms;

	/**
	 * 系统名称
	 */
	@Column(name = "system_name", length = 255)
	public String systemName;

	/**
	 * 系统名称
	 */
	@Column(name = "system_color", length = 20)
	public String systemColor;

	/**
	 * 商户号前缀
	 */
	@Column(name = "merchant_prefix", length = 10)
	public String merchantPrefix;

	/**
	 * 代理商号前缀
	 */
	@Column(name = "distributor_prefix", length = 10)
	public String distributorPrefix;

	/**
	 * 短信签名
	 */
	@Column(name = "sms_sign", length = 20)
	public String smsSign;

	/**
	 * 邮箱域名
	 */
	@Column(name = "email_hsot", length = 20)
	public String host;

	/**
	 * 发件人账号
	 */
	@Column(name = "email_user_name", length = 50)
	public String userName;

	/**
	 * 发件人
	 */
	@Column(name = "email_from", length = 50)
	public String from;

	/**
	 * 发件人密码
	 */
	@Column(name = "email_password", length = 50)
	public String password;

}
